-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove source code for GraphQLESTreeNode #17
Conversation
"paths": { | ||
/* TS complains not about to infer GraphQLESTreeNode */ | ||
"@graphql-eslint/eslint-plugin/estree-converter/*": [ | ||
"./node_modules/@graphql-eslint/eslint-plugin/cjs/estree-converter/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to point it out that using 'esm' instead of 'cjs' would not work. It would complain 'Could not find a declaration file'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look around bit more, lwc_mobile's "type" is "commonjs". graphql-eslint package.json has below.
"main": "cjs/index.js", // for common.js
"module": "esm/index.js",// for esm.
commonjs consumer looks for commonjs dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was my intuition too. But this is a great start! I going to poke around a bit on my own with regards to our overall project configuration. I wish it wasn't quite so tenuous to configure TypeScript projects. 🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. I'm not sure if we need to be a "commonjs" type of project, vs. reconfiguring our transpilation and/or packaging. If I look at ten different projects, I see ten different approaches to project configurations for issues like these. I imagine someday I'm going to have to work myself from the ground floor of the ECMAScript and modules spec, up through TypeScript specs and consumption, to module bundlers, to fully grasp how this is all supposed to work. 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! very elegant way solve the types issue.
Wes used similar pattern in lds-lightning-platform 3 years ago
Remove the source code file 'GraphQLESTreeNode'